package cn.yuanqiao.archive.supervision.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 讨论表对象 YQSUPERVISION_DISCUSS
 * 
 * @author xy
 * @date 2023-08-01
 */
public class Discuss extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQSUPERVISION_DISCUSS";

    public Discuss() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
          throw new ServiceException("tenantCode is null");

        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    /** id */
    @IdAnnotation
    private Long id;

    /** 讨论内容 */
    @Excel(name = "讨论内容")
    private String discussionContent;

    /** 创建ID */
    @Excel(name = "创建ID")
    private Long createId;

    /** 督察ID */
    @Excel(name = "督察ID")
    private Long supervisionId;

    private String createName;

    private Long loginId;


    private String tableName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDiscussionContent(String discussionContent) 
    {
        this.discussionContent = discussionContent;
    }

    public String getDiscussionContent() 
    {
        return discussionContent;
    }
    public void setCreateId(Long createId) 
    {
        this.createId = createId;
    }

    public Long getCreateId() 
    {
        return createId;
    }
    public void setSupervisionId(Long supervisionId) 
    {
        this.supervisionId = supervisionId;
    }

    public Long getSupervisionId() 
    {
        return supervisionId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public Long getLoginId() {
        return loginId;
    }

    public void setLoginId(Long loginId) {
        this.loginId = loginId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("discussionContent", getDiscussionContent())
            .append("createId", getCreateId())
            .append("createTime", getCreateTime())
            .append("supervisionId", getSupervisionId())
            .toString();
    }
}
